package com.smartticket.jeju.controller.user;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

import com.smartticket.jeju.model.User;
import com.smartticket.jeju.service.UserService;

@Controller
@RequestMapping("/userjoin")
public class UserJoin 
{
	@Autowired
	private UserService userService;
	
	@RequestMapping
	public String action(@ModelAttribute User user)
	{
		userService.add(user);
		
		return "redirect:/main";
	}
}
